﻿@{Post post = ViewBag.Post;}
<div id="respond">
    @using (Html.BeginForm("Comment", "Ajax", FormMethod.Post, new { id = "commentform" }))
    {
        <div class="comt-title">
            <div class="comt-avatar pull-left">
                <img src="@GetThemeUrl("/img/default.png")" class="avatar avatar-28 photo avatar-default" height="28" width="28"/>
            </div>
            <div class="comt-author pull-left">发表我的评论</div>
            <a id="cancel-comment-reply-link" class="pull-right" href="javascript:;">取消评论</a>
        </div>
        <div class="comt">
            <div class="comt-box">
                <label class="hide" for="comment_content">评论内容</label>
                <textarea id="comment_content" placeholder="写点什么..." class="input-block-level comt-area" name="Content" cols="100" rows="3" tabindex="1" onkeydown="if(event.ctrlKey&amp;&amp;event.keyCode==13){document.getElementById('submit').click();return false};"></textarea>
                @Html.Hidden("postid", post.Id)
                @Html.Hidden("parentid", 0)
                <div class="comt-ctrl">
                    <button id="submit" class="btn btn-primary pull-right" type="submit" tabindex="5"><i class="icon-ok-circle icon-white icon12"></i>提交评论</button>
                    <div class="comt-tips pull-right">
                        @*<p style="display: none;">
                            <input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="1b8f29843d" />
                        </p>*@
                    </div>
                    <span data-type="comment-insert-smilie" class="muted comt-smilie"><i class="icon-thumbs-up icon12"></i>表情</span>
                    @*<span class="muted comt-mailme">
                        <label for="comment_mail_notify" class="checkbox inline" style="padding-top: 0">
                            <input type="checkbox" name="comment_mail_notify" id="comment_mail_notify" value="comment_mail_notify" checked="checked" />有人回复时邮件通知我
                        </label>
                    </span>*@
                </div>
            </div>
            <div class="comt-comterinfo" id="comment-author-info">
                <h4>Hi，您需要填写昵称和邮箱！</h4>
                <ul>
                    <li class="form-inline">
                        <label class="hide" for="comment_name">昵称</label><input id="comment_name" type="text" name="AuthorName" tabindex="2" placeholder="昵称" /><span class="help-inline">昵称 (必填)</span></li>
                    <li class="form-inline">
                        <label class="hide" for="comment_email">邮箱</label><input id="comment_email" type="text" name="AuthorEmail" tabindex="3" placeholder="邮箱" /><span class="help-inline">邮箱 (必填)</span></li>
                    <li class="form-inline">
                        <label class="hide" for="comment_url">网址</label><input id="comment_url" type="text" name="AuthorUrl" tabindex="4" placeholder="网址" /><span class="help-inline">网址</span></li>
                </ul>
            </div>
        </div>
    }
</div>
<div id="postcomments">
    <h3 id="comments">网友最新评论<b>(@post.Comments.Count())</b></h3>
    <ol class="commentlist">
        @foreach (var item in post.Comments)
        {
            <li class="comment even thread-even depth-1" id="comment-17363">
                <div class="c-avatar">
                    <img alt="" src="@item.Gavatar(GetThemeUrl("/img/default.png"), 36, 'g')" class="avatar avatar-36 photo" height="36" width="36" />
                </div>
                <div class="c-main" id="div-comment-17363">
                    <p>
                        @Html.Raw(item.Content)
                    </p>
                    <div class="c-meta"><span class="c-author">@item.AuthorName</span>@item.PubDate.ToChsStr() <a class="comment-reply-link" href="#replytocom=17363#respond" onclick="return addComment.moveForm('div-comment-@item.Id', '@item.Id', 'respond', '4962')">回复</a></div>
                </div>
            </li>
            <!-- #comment-## -->
        }
    </ol>
    <div class="pagenav">
    </div>
</div>
